The conventional block matching algorithm is to regularly select a block smaller than a 1st frame at the center of the 1st frame as a reference block; then, proceeding the matching search for a 2nd frame based on the reference block. The matching method is to divide the 2nd frame into separated blocks the same size as the reference block, so called the sample blocks; then, applying the Mean Absolute Difference (MAD) method or the Mean Square Error (MSE) method to calculate the approximation among each pixel; and, finding a sample block from the sample blocks having the optimized matching with the reference block, which is the block with the minimum value after calculation, so as to calculate the displacement vector of the image.
            MAD      ⁡              (        s        )              =                  ∑                  x          =          1                M            ⁢                        ∑                      y            =            1                    M                ⁢                                                      RB              ⁡                              (                                  x                  ,                  y                                )                                      -                          SB              ⁡                              (                                  x                  ,                  y                  ,                  s                                )                                                                              MSE      ⁡              (        s        )              =                  ∑                  x          =          1                M            ⁢                        ∑                      y            =            1                    M                ⁢                              (                                          RB                ⁡                                  (                                      x                    ,                    y                                    )                                            -                              SB                ⁡                                  (                                      x                    ,                    y                    ,                    s                                    )                                                      )                    2                    
where RB(x, y) is the pixel value of the reference block; SB(x, y, s) is the pixel value of the sample block; M is the size of the matching block; and, s is the sequence number of the sample block in the sample blocks. Hereinafter, the conventional image displacement detection method will be described with the embodiments.
FIG. 1A˜1D are diagrams of the conventional image displacement detection methods. As shown in FIG. 1A, the size of the sensing array of the sensor is N*N, the size of the image matching reference block is M*M, the sampling frequency is f, and the actual side length of each pixel is L. The X-axis maximum displacement in x-axis direction is X_max=(N−M)÷2 pixels, and the Y-axis maximum displacement in y-axis direction is Y_max=(N−M)÷2 pixels. The maximum tracking speed of the conventional block matching method is (N−M)÷2×f×L (distance unit/second).
As shown in FIG. 1B, on the virtual desktop 10, the sensor moves from the upper left corner to the lower right corner, and respectively captures the continuous frames 12a˜12c. As shown in FIG. 1C, the captured frames 12a˜12c are respectively provided with the image features 14a˜14d. 
In order to detect the image displacement, a square block is taken at the center of the 1st frame 12a as the image matching reference block, which surrounds the image feature 14a; then, starting from the upper left corner of the 2nd frame 12b, the same method is used to take a subblock with the same size for matching to see if they are the same; and, in order to find the image displacement vector between the 1st frame 12a and the 2nd frame 12b, the search and matching procedure on the whole area of the 2nd image 12b is conducted.
In the whole-area search and matching procedure, it is to take another subblock of the same size by moving the frame 12b a pixel to the right, and continuously search from the left to the right, from top to bottom and in sequence to proceed the MAD or MSE block computation to find out the most matched subblock, and further to find the image displacement vector S(−x, +y) between the 1st frame 12a and the 2nd frame 12b. 
As shown in FIG. 1D, after individually matching with these subblocks, it can obtain a subblock mostly similar to the image matching reference block, and further obtain the image displacement vector S. The conventional block matching method employs the image matching reference block as the initial position (0, 0). If the position of the best matched subblock found relative to the image matching reference block is x pixels moving to the left, the image displacement vector is defined as “−x”, and if it is x pixels moving to the right, the image displacement vector is defined as “+x”, and if it is y pixels moving downward, the image displacement vector is defined as “−y”, and if it is y pixels moving upward, the image displacement vector is defined as “+y”. Therefore, for the obtained image displacement vector S(−x, +y), after the second time period, the center image feature 14a “□” of the 1st frame 12a is moved x pixels to the left on the x axis, and y pixels upward on the y axis.
FIGS. 2A and 2B are other diagrams of the conventional image displacement detection method. As shown in FIG. 2A, on the virtual desktop 10, the sensor moves from the upper left corner to the lower right corner, and respectively captures the continuous frames 12a˜12d. However, between the second continuous frame 12b and the third continuous frame 12c, a fast movement in an inertial direction suddenly happens to the sensor, and thus the captured image 12b and 12c is shown in FIG. 2B.
In FIG. 2B, the frame 12c is lack of the image feature 14b at the center of the frame 12b, thus in the conventional image displacement detection method the best matched subblock in the frame 12c cannot be found, neither can the image displacement vector.
The inventor of the present invention has viewed the improvement for the conventional image displacement detection method, and invented an image displacement detection method, which can relatively increase about twice the max tracking speed of the sensor.